package com.code.AZPlan.model.po;

import com.code.commons.model.po.BasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * AZ计划钱包转入与转出流水PO及持久层对象
 *
 * @author tangyifei
 * @since 2020年1月2日13:45:21
 */
@ApiModel("AZ计划钱包转入与转出流水PO及持久层对象")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class TransferInOutFlow extends BasePO<String> {

    private static final long serialVersionUID = -6716435743411600831L;

    @ApiModelProperty(value = "主键", example = "1")
    @Id
    @Length(min = 1, max = 64)
    private String id;

    @ApiModelProperty(value = "用户主键", example = "1")
    @NotBlank(message = "用户主键不能为空")
    @Length(min = 1, max = 64)
    private String userId;

    @ApiModelProperty(value = "用户账号", example = "1")
    private String userAccount;

    @ApiModelProperty(value = "转入方的手机号", example = "1")
    private String transferInUserPhone;

    @ApiModelProperty(value = "流水类型 1转入流水 2转出流水 3站内转入 4站内转出", example = "1")
    private Integer flowType;

    @ApiModelProperty(value = "币的种类", example = "XWC")
    @NotBlank(message = "币的种类不能为空")
    private String coinType;

    @ApiModelProperty(value = "币种地址", example = "XWC11111")
    @NotBlank(message = "币种地址不能为空")
    private String address;

    @ApiModelProperty(value = "金额", example = "25000XWC")
    @NotNull(message = "金额不能为空")
    private BigDecimal amount;

    @ApiModelProperty(value = "手续费", example = "0")
    private BigDecimal fee;

    @ApiModelProperty(value = "状态 0未完成 1已完成", example = "0")
    private Integer status;

}
